<?php
namespace entity;
use my\bq\entity\EntityTemplate;
class Goods extends EntityTemplate{
 private $goods_id;                                                                                                                                
 private $store_id;
 private $sale_type;
 private $type;
 private $goods_name;
 private $description;
 private $description1;
 private $description2;
 private $search_key;
 private $cate_id;
 private $cate_name;
 private $brand_id;
 private $brand;
 private $spec_qty;
 private $spec_name_1;
 private $spec_name_2;
 private $spec_name_3;
 private $spec_name_4;
 private $if_show;
 private $if_codpay;
 private $closed;
 private $close_reason;
 private $add_time;
 private $last_update;
 private $default_spec;
 private $default_image;
 private $recommended;
 private $cate_id_1;
 private $cate_id_2;
 private $cate_id_3;
 private $cate_id_4;
 private $price;
 private $market_price;
 private $tags;
 private $more_property;
 private $more_property_new;
 private $shipping_ids;
 private $approval_status;
 private $approval_summary;
 private $rebate;
 private $hidden_price;
 private $batch_id;
 private $cate_order;
 private $sales_discount;
 private $product_id;
 private $third_type;
 private $third_product_id;
 private $third_product_name;
 private $third_comment_ids;
 private $third_bad_comment_ids;
 private $promotion_type;
 private $promotion_activity_id;
 private $assign_goods_id;
 private $is_delete;
 private $is_book;
 private $manual_fees;
 private $supply_price;
 private $sku_inventory;
 private $freight_charge_type;
 private $freight_template_id;
 private $store_address;
 private $user;
 
 
	public function config(){
		$config = array();
		$config['name'] = 'ecm_goods';
		$config['alias'] = 'goods';
		$config['id'] = 'goods_id';
		$config['columns'] = array('goods_id','store_id','sale_type','type','goods_name','description','description1','description2','search_key','cate_id','cate_name','brand_id','brand','spec_qty','spec_name_1','spec_name_2','spec_name_3','spec_name_4','if_show','if_codpay','closed','close_reason','add_time','last_update','default_spec','default_image','recommended','cate_id_1','cate_id_2','cate_id_3','cate_id_4','price','market_price','tags','more_property','more_property_new','shipping_ids','approval_status','approval_summary','rebate','hidden_price','batch_id','cate_order','sales_discount','product_id','third_type','third_product_id','third_product_name','third_comment_ids','third_bad_comment_ids','promotion_type','promotion_activity_id','assign_goods_id','is_delete','is_book','manual_fees','supply_price','sku_inventory','freight_charge_type','freight_template_id','store_address');
		$config['relations'] = array();
		$config['relations'][0]= array('relation'=>'one-to-one','class'=>new User(),'name'=>'user','key'=>'store_id','column'=>'user_id','lazy'=>true,'cascade'=>'update,save');
		$this->config = $config;
	}
	
	public function __get($var){
		if(isset($this->$var)) {
			return $this->$var;
		}else{
			return parent::output($var); 
		}
	}
	
	public function __set($var,$value){
		$this->$var = $value;
	}
	
}